-
-
Notifications
You must be signed in to change notification settings - Fork 755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: updated handling of markdown headers #3896
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
const type = options.editor.getType({ key: headingType }); | ||
|
||
if (!type) { | ||
console.warn(`Heading type ${headingType} not registered in editor`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we want to warn here. We could default to the latest heading type supported (e.g. h3)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the issue with this is that h3 will be confusing. Its difficult to understand the issue otherwise. I will keep it on p
unless you insist.
packages/markdown/src/lib/remark-slate/remarkDefaultElementRules.ts
Outdated
Show resolved
Hide resolved
Looks good, just need to fix the CI |
a9bc5a9
into
udecode:update-markdown-handling
Checklist
yarn typecheck
yarn lint:fix
yarn test
yarn brl
yarn changeset
This PR updates the handling of headers when deserializing markdown. Tests have been updated as well.